<template>
  <div>
  <el-button @click="dialogVisible = true">点击打开 Dialog</el-button>
  <el-dialog
    title="购物车结算"
    :visible.sync="dialogVisible"
    width="50%"
    height="400px"
    :before-close="handleClose">
    <div>
      <h1>总价：<span style="color: red;">￥{{70}}</span></h1>
    </div>
    <el-button type="primary" @click="printf(gridData)" disabled>微信支付</el-button>
    <el-button type="primary" @click="printf(gridData)">支付宝支付</el-button>
    <el-button type="primary" @click="dialogVisible = false">银联支付</el-button>
  </el-dialog>
  </div>
</template>

<script>
export default {
  name:'test',
  data() {
    return {
      dialogVisible: false,
      gridData:[
        {
          id:11111234,
          name:'全部商品',
          price:29.6
        }
      ]
    };
  },
  methods: {
    handleClose(done) {
      this.$confirm('确认关闭？')
          .then(() => {
            done();
          })
          .catch(() => {});
    },
    printf(data){
      window.console.log(data)
    }
  }
}
</script>